package com.gljx.web.controller.JournalController;

import com.gljx.web.Entity.Person;
import com.gljx.web.Entity.User;
import com.gljx.web.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * 薪资发放统计表
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/")
public class RemunProvideJournalController {
	
	@Autowired
	private PersonService personService;
	

	@RequestMapping(value="/queryRemunProvideJournal/look.action")
	public String selRemunProvideJournal(HttpServletRequest request)throws Exception{
		// 获取当前操作人
		HttpSession session = request.getSession();
		User user =(User)session.getAttribute("user");
		//获取职员
		List<Person> personList=personService.selPersionByFcomanyid(user.getFcompanyid());
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		String time = sdf.format(new Date());
		request.setAttribute("personList", personList);
		request.setAttribute("time", time);
		return "backHome/journaling/manageJournaling/remunProvideJournaling/remunProvideJournalingList";
	}
}
